if map(int, orig_version.split('.')) >= map(int, version.split('.')):
self.can_build_ok = 1
return 1
continue
print 'Warning: Too old version of %s' % self.pkc_name
print ' Need %s, but %s is installed' % (package, orig_version)
self.can_build_ok = 0
return 0
def generate(self):
pass
template_classes_enabled = True
codegen_error_message = '\n***************************************************************************\nCodegen could not be found on your system and is required by the\ndsextras.Template and dsextras.TemplateExtension classes. codegen is part\nof PyGTK. To use either Template or TemplateExtension, you should also\ninstall PyGTK.\n***************************************************************************\n'
try:
from codegen.override import Overrides
from codegen.defsparser import DefsParser
from codegen.codegen import register_types, SourceWriter, FileOutput
import codegen.createdefs as codegen
except ImportError:
e = None
template_classes_enabled = False
class Template(object):
def __new__(cls, *args, **kwds):
if not template_classes_enabled:
raise NameError("'%s' is not defined\n" % cls.__name__ + codegen_error_message)